﻿@model NWNT.Web.Models.StressResultModel
@{
    ViewBag.Title = "StressResult";    
}
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
@*<script src="../../Scripts/jsapi.js"></script>*@
<script type="text/javascript">
    google.load("visualization", "1", { packages: ["corechart"] });
    google.setOnLoadCallback(drawChart);
    var finalResult = 0;
    function drawChart() {
        var areas = [@Html.Raw(Json.Encode(Model.Areas))];
        var results = [@Html.Raw(Json.Encode(Model.Results))];
        var resultForApi = [];

        resultForApi.push(['Area', 'Results', { role: 'style' }]);
       
        var finalResult = results[0].reduce(function (a, b) {
            return a + b;
        });
        var finalVal='';
        if(finalResult<26)
        {
            finalVal="Your Result: <span style='color:green;font-weight:bold;'>Normal</span>";
        }
        else if (finalResult >= 26 && finalResult <=70) {
            finalVal = "Your Result: <span style='color:Yellow;font-weight:bold;'>Manageable</span>";
        }
        else if (finalResult > 70 && finalResult <= 100) {
            finalVal = "Your Result: <span style='color:orange;font-weight:bold;'>Modrate</span>";
        }
        else {
            finalVal = "Your Result: <span style='color:red;font-weight:bold;'>Severe</span>";
        }
        $('#ctl00_ContentPlaceHolder1_ResultCaptionLabel').html(finalVal);

        for (i = 0; i < areas[0].length; i++) {
            //finalResult += parseInt(results[0][i], 10);
            //console.log(finalResult);
            resultForApi.push([areas[0][i], results[0][i], (parseInt(results[0][i], 10) <= 9 ? 'green' : (parseInt(results[0][i], 10) >= 10 && parseInt(results[0][i], 10) <= 19 ? 'orange' : 'red'))]);
        }
        var data = google.visualization.arrayToDataTable(resultForApi);
        var options = {
            //title: 'Stress-o-meter Result'
            title: ''
        };
        var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
        chart.draw(data, options);

        //Scoring  Result  Color
        //1 0-25  Normal  Green
        //2 26-70  Manageable  Yellow
        //3 71-100  Modrate  Orange
        //4 >100  Severe  Red‏
    }
</script>
<table border="0" width="100%" cellpadding="4" cellspacing="2">
    <tbody>
        <tr>
            <td colspan="2" class="bnd02">
                <span id="ctl00_ContentPlaceHolder1_ResultCaptionLabel"></span>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="txt00" style="text-align: justify;" colspan="3" valign="top">
                <span class="txt13"><strong>Interpretation of color band</strong></span><br>
                The yellow color in the Stress-o-meter band denotes manageable level of stress.
                                                    <br>
                This means that you still have resources (inner/ outer) to cater to the demands on
                                                    you. Constant presence of stress symptoms can prove to be alarming.
                                                    <br>
                Please see the following chart to understand 5 areas of your life and level of stress
                                                    emanating from each area at this juncture. 
            </td>
        </tr>
        <tr>
            <td>
                <div id="chart_div" style="width: 900px; height: 500px;"></div>
            </td>
        </tr>
        <tr>
            <td colspan="3" class="txt13" align="justify" valign="top">
                <strong>Your next suggested steps-</strong>
                <ul>
                    <li>Identify the stressors</li>
                    <li>Avoid unnecessary stress</li>
                    <li>Alter situations which causes stress</li>
                    <li>Adapt the stressor</li>
                    <li>Accept things you can’t change </li>
                    <li>Adopt a healthy life style</li>
                </ul>
                <br>
                It is important to take stress symptoms seriously. We cannot always choose our circumstances,
                                                    but we can certainly choose to deal with them in a constructive manner. It’s better
                                                    to deal with stress while it is under your control than to let it control you. We
                                                    suggest you to use your social skills and seek support from friends and family and
                                                    squeeze out time for some physical exercises and relaxation techniques.<br>
                <b>Please seek professional help from us for assisting you to deal with managing stress.</b>
                <br>
                <br>
            </td>
        </tr>
    </tbody>
</table>
<table>

    <tbody>
        <tr>
            <td class="innerpageheading" colspan="3" valign="top">Know More About Stress 
            </td>
        </tr>
        <tr>
            <td colspan="3" class="txt13" align="justify" valign="top">
                <strong>Why do you require managing your stress?</strong><br>
                Stress can alter our body in many ways. Stress is a potential contributor to chronic
                                                fluctuating sugar levels in diabetes. Stress has long been shown to have major effects
                                                on metabolic activity. Stress increases the risk of heart diseases. Stress itself
                                                might be a risk factor, or it could be that high levels of stress make other risk
                                                factors (such as high cholesterol/ high blood pressure) worse. For e.g.: if you
                                                are under stress, your blood pressure goes up.
                                                <br>
                Besides this, there is a significant relationship between daily stress and occurrence
                                                of both concurrent and subsequent health problems such as flu, sore throat, headaches
                                                and backaches.
                                                <br>
                <br>
                <strong>Causes of stress.</strong><br>
                <ul>
                    <li>Work - Stress occurs in a wide range of work circumstances but is often made worse
                                                        when one feels one has little support from supervisors and colleagues, as well as
                                                        little control over work processes. It is the response people may have when presented
                                                        with work demands and pressures that are not matched to their knowledge and abilities
                                                        and which challenge their ability to cope.</li>
                    <li>Family/ Home Life- Most of us also constantly worry about our family members, and
                                                        worry is just another word for stress. We are concerned about our family's safety,
                                                        health and well-being, all of which are beyond our control. Family can be a source
                                                        of great joy, but also great conflict, and conflict causes stress. Spouses who disagree,
                                                        parents who nag, teenagers who don't cooperate, toddlers who throw tantrums, etc.</li>
                    <li>Financial Strain- Financial trouble is a common source of stress. Credit card debt,
                                                        not making rent, inability to provide for a family—not being able to make ends meet
                                                        can put a serious amount of stress on a person.</li>
                    <li>Incidents, circumstances, life changes- Major life changes, whether positive or
                                                        negative, bring about stress. People experience stress as they adjust and adapt
                                                        to positive changes, such as pregnancy or adoption, marriage or a new home. Negative
                                                        changes, like the death of a loved one or divorce can cause stress for obvious reasons.</li>
                    <li>Relationships- Personal relationships can be a significant source of stress. While
                                                        the relationships between parents and children and between husband and wife are
                                                        the most typical personal relationships, they can contribute to stress when strained;
                                                        a disagreement with a co-worker can be equally stressful. Additionally, stress can
                                                        result from relationships that have not yet begun. </li>
                    <li>The Unexpected- When things happen that we weren't planning on, we have to adjust
                                                        our plans, our routines and our lives to accommodate. This could be something small
                                                        like an uninvited house guest or it could be something tragic like the loss of a
                                                        job, a car accident or the diagnosis of a terminal illness.</li>
                    <li>Internal Stressors- We all have internal irritations that cause stress also. People
                                                        with a habitually negative attitude live with a lot of stress because they "create
                                                        an unpleasant environment in which to live". Having unrealistic expectations can
                                                        cause high levels of stress because you are never satisfied with yourself or your
                                                        accomplishments.</li>
                    <li>Health- Illness causes stress, especially if surgery, treatments and medications
                                                        are part of the healing process. While stress about one's own health is something
                                                        that we all must deal with, that same type of stress can reach unthinkable heights
                                                        when caused by the poor health of a loved one. Worrying about the health of your
                                                        mate, child or parents can be a constant drain on your energy and resources.</li>
                </ul>
            </td>
        </tr>

        <tr>
            <td colspan="3" align="center" valign="top">
                <img src="../../Content/Default/images/CausesofStress.png" alt="" height="350" width="650">
            </td>
        </tr>

        <tr>
            <td colspan="3" class="txt13" align="justify" valign="top">
                <strong>Some facts and figures</strong><br>
                According to WHO, globally, every fourth person has some stress related or associated
                                                problem which includes anxiety, depression, bipolar disorder, schizophrenia, mental
                                                retardation, alcoholism, drug abuse or epilepsy. By 2020 mental depression will
                                                be largest cause of disability worldwide and by 2025 it may over take heart diseases
                                                as the biggest health concern. Nearly 1% of the Indian population suffers from serious
                                                mental &amp; behavioral disorders and 10% from moderate disorders, requiring psychiatric
                                                help. Mental and behavioral disorders account for 19% of the global burden of disease.
                                                Nearly 10% of total population suffers from these disorders.
                                                <br>
                <br>
                <strong>Some simple stress busters </strong>
                <br>
                <ul>
                    <li>Take a walk- Go brisk walk every day.</li>
                    <li>Deep breathing- Deep breathing is one of the best ways to lower stress in the body.
                                                        This is because when you breathe deeply, it sends a message to your brain to calm
                                                        down and relax. deep breathing is marked by expansion of the abdomen rather than
                                                        the chest when breathing, It is considered by some to be a healthier way to breathe,</li>
                    <li>Do some yoga- A few minutes of yoga during the day can be a great way to get rid
                                                        of stress that accumulates daily - in both the body and mind. try to train yourself
                                                        through CD’s, DVD’s available to learn yoga at home, also there are online video
                                                        clips available through which one can learn yogasanas.</li>
                    <li>Laugh it out - Make time for leisure activities that bring you joy, whether it be
                                                        stargazing, playing the piano, watch comedy shows, movies or working on your bike.</li>
                    <li>Eat Healthy- Well-nourished bodies are better prepared to cope with stress, so be
                                                        mindful of what you eat. Drink a lot of water and include green vegetables in your
                                                        meals.</li>
                    <li>Get enough sleep- Adequate sleep fuels your mind, as well as your body. Feeling
                                                        tired will increase your stress because it may cause you to think irrationally.
                                                        It is recommended to have 7-8hrs of undisturbed sleep.</li>
                    <li>Change your Attitude- Adopt positive thinking in your life.</li>
                    <li>Exercise regularly-
                                                        Physical activity plays a key role in reducing and preventing the effects of stress.
                                                        Make time for at least 30 minutes of exercise. Add some outdoor games in your day
                                                        to day routine.</li>
                    <li>Meditate- Meditation can be an effective form of stress reduction and has the potential
                                                        to improve quality of life and decrease health care cost. Self learning CD’s and
                                                        DVD’s can be helpful.</li>
                </ul>
            </td>
        </tr>

    </tbody>
</table>

